home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / ODFDev / ODF / OS / FWGraphx / Include / FWOvlShp.h < prev    next >
Encoding:
Text File  |  1995-11-08  |  2.5 KB  |  95 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWOvlShp.h
  4. //    Release Version:    $ 1.0d11 $
  5. //
  6. //    Copyright:    © 1993, 1995 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef FWOVLSHP_H
  11. #define FWOVLSHP_H
  12.  
  13. #ifndef FWSHAPE_H
  14. #include "FWShape.h"
  15. #endif
  16.  
  17. #ifndef FWBNDSHP_H
  18. #include "FWBndShp.h"
  19. #endif
  20.  
  21. #if FW_LIB_EXPORT_PRAGMAS
  22. #pragma lib_export on
  23. #endif
  24.  
  25. //========================================================================================
  26. //    Forward Declarations
  27. //========================================================================================
  28.  
  29. class FW_CLASS_ATTR FW_CGraphicContext;
  30.  
  31. //========================================================================================
  32. //    class FW_COvalShapeRep
  33. //========================================================================================
  34.  
  35. class FW_CLASS_ATTR FW_COvalShape : public FW_CBoundedShape
  36. {
  37. public:
  38.     FW_DECLARE_CLASS
  39.  
  40. //----------------------------------------------------------------------------------------
  41. //    Constructors/Destructors
  42. //
  43. public:
  44.     FW_COvalShape(const FW_CRect& rect,
  45.                   FW_ERenderVerbs renderVerb,
  46.                   const FW_PInk& ink = FW_kNormalInk,
  47.                   const FW_PStyle& style = FW_kNormalStyle);
  48.  
  49.     FW_COvalShape(const FW_COvalShape& other);
  50.     FW_COvalShape(FW_CReadableStream& archive);
  51.     
  52.     virtual ~ FW_COvalShape();
  53.     
  54. //----------------------------------------------------------------------------------------
  55. //    Inherited API
  56. //
  57. public:
  58.     // ----- Hit Testing -----
  59.     virtual FW_Boolean HitTest(FW_CGraphicContext& gc,
  60.                                 const FW_CPoint& test,
  61.                                 FW_CFixed tolerance) const;
  62.  
  63.     // ----- Copying -----
  64.     virtual FW_CShape*            Copy() const;
  65.     
  66.     // ----- Rendering -----
  67.     virtual void                 Render(FW_CGraphicContext& gc) const;
  68.     
  69. //----------------------------------------------------------------------------------------
  70. //    New API
  71. //
  72. public:
  73.     // ----- Geometry -----
  74.     void            GetGeometry(FW_CRect& rect) const
  75.                         {rect = fRect;}
  76.     void            SetGeometry(const FW_CRect& rect)
  77.                         {fRect = rect;}
  78.  
  79.     // ----- Rendering -----
  80.     static void    RenderOval(FW_CGraphicContext& gc,
  81.                                 const FW_CRect& rect, 
  82.                                 FW_ERenderVerbs renderVerb,
  83.                                 const FW_PInk& ink = FW_kNormalInk,
  84.                                 const FW_PStyle& style = FW_kNormalStyle);
  85.  
  86.     // ----- Archiving -----
  87.     static void*    Read(FW_CReadableStream& archive);
  88. };
  89.  
  90. #if FW_LIB_EXPORT_PRAGMAS
  91. #pragma lib_export off
  92. #endif
  93.  
  94. #endif
  95.